using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using MinoChat.Services.Interfaces;
using System.Collections.ObjectModel;

namespace MinoChat.ViewModels.Pages;

public class MaskItem
{
    public string Icon { get; set; } = string.Empty;
    public string Title { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;
}

public partial class MaskPageViewModel : ObservableObject
{
    private readonly INavigationService _navigationService;

    [ObservableProperty]
    private ObservableCollection<MaskItem> _masks = new();

    [ObservableProperty]
    private MaskItem? _selectedMask;

    public MaskPageViewModel(INavigationService navigationService)
    {
        _navigationService = navigationService;
        LoadMasks();
    }
    
    private void LoadMasks()
    {
        Masks.Add(new MaskItem
        {
            Icon = "🧙‍♂️",
            Title = "程序助手",
            Description = "回答编程相关问题，帮助解决代码难题"
        });
        
        Masks.Add(new MaskItem
        {
            Icon = "📚",
            Title = "学习顾问",
            Description = "解答学术问题，帮助规划学习计划"
        });
        
        Masks.Add(new MaskItem
        {
            Icon = "🎨",
            Title = "创意伙伴",
            Description = "激发灵感，帮助构思创意项目和内容创作"
        });
        
        Masks.Add(new MaskItem
        {
            Icon = "⚙️",
            Title = "自定义角色",
            Description = "创建您自己的AI角色定义，完全自定义AI行为"
        });
    }
    
    [RelayCommand]
    private void SelectMask(MaskItem mask)
    {
        SelectedMask = mask;
        // 执行选择角色后的操作
    }

    [RelayCommand]
    private void ClosePage()
    {
        _navigationService.GoBack();
    }
} 